<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="keywords" content="���˲���,������˲���,���˲���ģ��,����" />
    <meta name="description" content="������˲��ͣ���һ��վ��webǰ�����֮·��Ů����Ա������վ���ṩ���˲���ģ�������Դ���صĸ���ԭ����վ��" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/templates/boke/css/base.css" rel="stylesheet">
    <link href="/templates/boke/css/index.css" rel="stylesheet">
    <link href="/templates/boke/css/info.css" rel="stylesheet">
    <link href="/templates/boke/css/m.css" rel="stylesheet">
    <link href="/templates/boke/css/comment.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/Swiper/4.3.0/css/swiper.min.css" rel="stylesheet">
    {{--<link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">--}}
    <!--[if lt IE 9]>
    <script src="/templates/boke/js/modernizr.js"></script>
    <![endif]-->
</head>
<body>
<header>
    <div class="logo">
        <a href="/"style="font-size: 30px">Marui 博客</a>
        <ul class="navbar-nav ml-auto" style="float: right;width: 120px" >
            <!-- Authentication Links -->
            @guest
                <li class="nav-item mr-5" style="float: left;font-size: 18px">
                    <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
                </li>
                <li class="nav-item mr-0" style="float: right;font-size: 18px">
                    <a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
                </li>
                @else
                    <li class="nav-item dropdown">
                        <a id="navbarDropdown"  style="float: left;font-size: 18px"   class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
                            {{ Auth::user()->name }} <span class="caret"></span>
                        </a>

                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown" style="float: right;font-size: 18px">
                            <a class="dropdown-item" href="{{ route('logout') }}"
                               onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                {{ __('Logout') }}
                            </a>

                            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                @csrf
                            </form>
                        </div>
                    </li>
                    @endguest
        </ul>
    </div>

    <nav id="nav">
        <ul>
            @category(['pid' => 0])
            <li><a href="{{$v['url']}}" style="font-size: 18px">{{$v['cname']}}</a></li>
            @endcategory
        </ul>
    </nav>

    <script>
        window.onload = function ()
        {
            var obj=null;
            var As=document.getElementById('nav').getElementsByTagName('a');
            obj = As[0];
            for(i=1;i<As.length;i++){if(window.location.href.indexOf(As[i].href)>=0)
                obj=As[i];}
            obj.id='selected'
        }
    </script>
</header>
@include('components._message')
@yield('content')

<footer>
    <p>Design by <a href="http://www.yangqq.com" target="_blank">杨青个人博客</a> <a href="/">蜀ICP备11002373号-1</a></p>
</footer>

</body>
</html>